/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.triumphsys.icici.cmeeting.portlet.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.impl.BaseModelImpl;

import java.io.Serializable;

import java.lang.reflect.Proxy;

import java.util.Date;

/**
 * @author Triumphsys
 */
public class CMPostProposalClp extends BaseModelImpl<CMPostProposal>
	implements CMPostProposal {
	public CMPostProposalClp() {
	}

	public long getPrimaryKey() {
		return _postProposalId;
	}

	public void setPrimaryKey(long pk) {
		setPostProposalId(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return new Long(_postProposalId);
	}

	public long getPostProposalId() {
		return _postProposalId;
	}

	public void setPostProposalId(long postProposalId) {
		_postProposalId = postProposalId;
	}

	public Date getCodCcmDt() {
		return _codCcmDt;
	}

	public void setCodCcmDt(Date codCcmDt) {
		_codCcmDt = codCcmDt;
	}

	public long getBranchId() {
		return _branchId;
	}

	public void setBranchId(long branchId) {
		_branchId = branchId;
	}

	public String getApprovalTl() {
		return _approvalTl;
	}

	public void setApprovalTl(String approvalTl) {
		_approvalTl = approvalTl;
	}

	public String getApprovalRmg() {
		return _approvalRmg;
	}

	public void setApprovalRmg(String approvalRmg) {
		_approvalRmg = approvalRmg;
	}

	public long getCoePTypeId() {
		return _coePTypeId;
	}

	public void setCoePTypeId(long coePTypeId) {
		_coePTypeId = coePTypeId;
	}

	public long getRatingRmgId() {
		return _ratingRmgId;
	}

	public void setRatingRmgId(long ratingRmgId) {
		_ratingRmgId = ratingRmgId;
	}

	public long getSmId() {
		return _smId;
	}

	public void setSmId(long smId) {
		_smId = smId;
	}

	public long getTlId() {
		return _tlId;
	}

	public void setTlId(long tlId) {
		_tlId = tlId;
	}

	public String getIpNetM() {
		return _ipNetM;
	}

	public void setIpNetM(String ipNetM) {
		_ipNetM = ipNetM;
	}

	public String getProposalName() {
		return _proposalName;
	}

	public void setProposalName(String proposalName) {
		_proposalName = proposalName;
	}

	public long getReportingAId1() {
		return _reportingAId1;
	}

	public void setReportingAId1(long reportingAId1) {
		_reportingAId1 = reportingAId1;
	}

	public String getProgram() {
		return _program;
	}

	public void setProgram(String program) {
		_program = program;
	}

	public Date getProgramExpery() {
		return _programExpery;
	}

	public void setProgramExpery(Date programExpery) {
		_programExpery = programExpery;
	}

	public long getProposalId() {
		return _proposalId;
	}

	public void setProposalId(long proposalId) {
		_proposalId = proposalId;
	}

	public CMPostProposal toEscapedModel() {
		if (isEscapedModel()) {
			return this;
		}
		else {
			return (CMPostProposal)Proxy.newProxyInstance(CMPostProposal.class.getClassLoader(),
				new Class[] { CMPostProposal.class },
				new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		CMPostProposalClp clone = new CMPostProposalClp();

		clone.setPostProposalId(getPostProposalId());
		clone.setCodCcmDt(getCodCcmDt());
		clone.setBranchId(getBranchId());
		clone.setApprovalTl(getApprovalTl());
		clone.setApprovalRmg(getApprovalRmg());
		clone.setCoePTypeId(getCoePTypeId());
		clone.setRatingRmgId(getRatingRmgId());
		clone.setSmId(getSmId());
		clone.setTlId(getTlId());
		clone.setIpNetM(getIpNetM());
		clone.setProposalName(getProposalName());
		clone.setReportingAId1(getReportingAId1());
		clone.setProgram(getProgram());
		clone.setProgramExpery(getProgramExpery());
		clone.setProposalId(getProposalId());

		return clone;
	}

	public int compareTo(CMPostProposal cmPostProposal) {
		int value = 0;

		if (getPostProposalId() < cmPostProposal.getPostProposalId()) {
			value = -1;
		}
		else if (getPostProposalId() > cmPostProposal.getPostProposalId()) {
			value = 1;
		}
		else {
			value = 0;
		}

		if (value != 0) {
			return value;
		}

		return 0;
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		CMPostProposalClp cmPostProposal = null;

		try {
			cmPostProposal = (CMPostProposalClp)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		long pk = cmPostProposal.getPrimaryKey();

		if (getPrimaryKey() == pk) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return (int)getPrimaryKey();
	}

	public String toString() {
		StringBundler sb = new StringBundler(31);

		sb.append("{postProposalId=");
		sb.append(getPostProposalId());
		sb.append(", codCcmDt=");
		sb.append(getCodCcmDt());
		sb.append(", branchId=");
		sb.append(getBranchId());
		sb.append(", approvalTl=");
		sb.append(getApprovalTl());
		sb.append(", approvalRmg=");
		sb.append(getApprovalRmg());
		sb.append(", coePTypeId=");
		sb.append(getCoePTypeId());
		sb.append(", ratingRmgId=");
		sb.append(getRatingRmgId());
		sb.append(", smId=");
		sb.append(getSmId());
		sb.append(", tlId=");
		sb.append(getTlId());
		sb.append(", ipNetM=");
		sb.append(getIpNetM());
		sb.append(", proposalName=");
		sb.append(getProposalName());
		sb.append(", reportingAId1=");
		sb.append(getReportingAId1());
		sb.append(", program=");
		sb.append(getProgram());
		sb.append(", programExpery=");
		sb.append(getProgramExpery());
		sb.append(", proposalId=");
		sb.append(getProposalId());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(49);

		sb.append("<model><model-name>");
		sb.append("com.triumphsys.icici.cmeeting.portlet.model.CMPostProposal");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>postProposalId</column-name><column-value><![CDATA[");
		sb.append(getPostProposalId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>codCcmDt</column-name><column-value><![CDATA[");
		sb.append(getCodCcmDt());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>branchId</column-name><column-value><![CDATA[");
		sb.append(getBranchId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>approvalTl</column-name><column-value><![CDATA[");
		sb.append(getApprovalTl());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>approvalRmg</column-name><column-value><![CDATA[");
		sb.append(getApprovalRmg());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>coePTypeId</column-name><column-value><![CDATA[");
		sb.append(getCoePTypeId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>ratingRmgId</column-name><column-value><![CDATA[");
		sb.append(getRatingRmgId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>smId</column-name><column-value><![CDATA[");
		sb.append(getSmId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>tlId</column-name><column-value><![CDATA[");
		sb.append(getTlId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>ipNetM</column-name><column-value><![CDATA[");
		sb.append(getIpNetM());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>proposalName</column-name><column-value><![CDATA[");
		sb.append(getProposalName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>reportingAId1</column-name><column-value><![CDATA[");
		sb.append(getReportingAId1());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>program</column-name><column-value><![CDATA[");
		sb.append(getProgram());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>programExpery</column-name><column-value><![CDATA[");
		sb.append(getProgramExpery());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>proposalId</column-name><column-value><![CDATA[");
		sb.append(getProposalId());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private long _postProposalId;
	private Date _codCcmDt;
	private long _branchId;
	private String _approvalTl;
	private String _approvalRmg;
	private long _coePTypeId;
	private long _ratingRmgId;
	private long _smId;
	private long _tlId;
	private String _ipNetM;
	private String _proposalName;
	private long _reportingAId1;
	private String _program;
	private Date _programExpery;
	private long _proposalId;
}